import React from "react";
import lazyLoad from "@/routers/utils/lazyLoad";
import { LayoutIndex } from "@/routers/constant";
import { RouteObject } from "@/routers/interface";

// echarts 模块
const JavaScriptRouter: Array<RouteObject> = [
    {
        element: <LayoutIndex />,
        meta: {
            title: "JavaScript"
        },
        children: [
            {
                path: "/JavaScript/this",
                element: lazyLoad(React.lazy(() => import("@/views/JavaScript/this/index"))),
                meta: {
                    requiresAuth: true,
                    title: "基础知识",
                    key: "waterChart"
                }
            },{
                path: "/JavaScript/publicMethod",
                element: lazyLoad(React.lazy(() => import("@/views/JavaScript/publicMethod/index"))),
                meta: {
                    requiresAuth: true,
                    title: "常用共方法",
                    key: "常用共方法"
                }
            },{
                path: "/JavaScript/code",
                element: lazyLoad(React.lazy(() => import("@/views/JavaScript/code/index"))),
                meta: {
                    requiresAuth: true,
                    title: "常见状态码",
                    key: "常见状态码"
                }
            },
        ]
    }
];

export default JavaScriptRouter;
